import React, { memo } from 'react'
import RoomItem from '@/components/room-item/index'
import RoomList from './style'
import ScrollView from '@/base-ui/scroll-view/index'
const index = memo((props) => {
    const {goodPriceInfo} = props
  return (
    <RoomList>
    <div className="title">
    <h4>{goodPriceInfo?.title}</h4>
    <h6>{goodPriceInfo?.subtitle}</h6>
    </div>
    <ScrollView>
    <ul>
      {
        goodPriceInfo?.list?.slice(0,8).map((n,i)=>{
          return <RoomItem itemData={n} key={i}></RoomItem>
        })
      }
    </ul>
    </ScrollView>
  </RoomList>
  )
})

index.defaultProps = {
    goodPriceInfo:{}
}

export default index